Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for transects plotted on the native MPAS-Ocean mesh #718

Merged
merged 14 commits into from
Jan 14, 2022

Conversation

xylar
Copy link
Collaborator

@xylar xylar commented Aug 3, 2020

This merge adds support for using MPAS-Tools to compute transects on the native MPAS-Ocean mesh. Observations are interpolated to the MPAS transect so comparison can also take place on this mesh.

Major changes are made to how vertical sections are plotted, making a matplotlib.tri.Triangulation from the logically rectangular grids we have used so far so that we can optionally pass the arguments needed to create a triangulation on the native MPAS mesh. The approach of outlining the valid region of the transect using a contour also no longer works with the native triangulation, so coordinates for producing an outline can optionally be passed in instead.

The mpas native grid has been made the default in configs/polarRegions.conf.

closes #586

@pep8speaks
Copy link

pep8speaks commented Aug 3, 2020

Hello @xylar! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 259:22: E127 continuation line over-indented for visual indent

Comment last updated at 2021-11-30 14:25:21 UTC

@xylar
Copy link
Collaborator Author

xylar commented Aug 3, 2020

@milenaveneziani, I'm still testing this out. I'll post some results and then ask you to test as well when you have time.

@xylar
Copy link
Collaborator Author

xylar commented Aug 3, 2020

This PR should not be merged until mpas_tools 0.0.11 has been released (after MPAS-Dev/MPAS-Tools#324 and MPAS-Dev/MPAS-Tools#331 have been merged).

@xylar xylar force-pushed the native_transects_mpas_tools branch from 2346b07 to 2c8fd10 Compare August 17, 2020 19:34
@milenaveneziani
Copy link
Collaborator

Hey @xylar, I was checking this again and wondered how far you think it is from being a part of MPAS-Analysis, now that so much progress has gone into MPAS-Tools since the past summer. I know you have a lot on your plate right now, but, if you think the effort on your side is small, I would be willing to do some extensive testing.

@xylar
Copy link
Collaborator Author

xylar commented Apr 11, 2021

@milenaveneziani, thanks for checking on this. My recollection is that the results were still buggy when I check on them and I had the impression that there would be several days of effort needed to get it working. It hasn't been a top priority for me since then. I'd love to have these but making them robust is likely to take a bit of effort over a couple of months.

But I'll make sure this gets back onto my to-do list as soon as the new compass is merged in, in couple of weeks to a month.

@milenaveneziani
Copy link
Collaborator

No worries @xylar. Your last comment in August made me (wishfully :) think that this was closer to being ready. Definitely not a priority at the moment.

xylar added 10 commits November 30, 2021 13:30
This will make it easier to support native MPAS grids in future
plots.
Plotting is now with tripcolor, tricontour and tricontourf.

This will allow generalization to plots where triangulation is
done ahead of time, e.g. for sections on the native MPAS mesh.
The coordinates are now keyword arguments since they are optional.
This is just for more convenient imports
* Pass arguments to create a triangulation rather than requiring
  a specific form for a data set
* Update how outlines are handled if passed in as arguments
@xylar xylar force-pushed the native_transects_mpas_tools branch from 2c8fd10 to a5b08b4 Compare November 30, 2021 12:41
@xylar xylar force-pushed the native_transects_mpas_tools branch from a5b08b4 to 005a43c Compare November 30, 2021 14:25
@xylar xylar removed the in progress label Dec 29, 2021
@xylar
Copy link
Collaborator Author

xylar commented Dec 29, 2021

@milenaveneziani, this is ready for you to try out if you have time. It would be great to include it in the next version, even if we don't use it by default.

@xylar
Copy link
Collaborator Author

xylar commented Jan 14, 2022

I'm going to merge this, with the plan that we will further test it as part of E3SM-Unified testing.

@xylar xylar merged commit 568008c into MPAS-Dev:develop Jan 14, 2022
@xylar xylar deleted the native_transects_mpas_tools branch January 14, 2022 13:06
@xylar xylar removed the request for review from milenaveneziani January 14, 2022 13:06
@milenaveneziani
Copy link
Collaborator

sorry @xylar, I missed the notification for this one. This is great news!
I really would like to try it out at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

transects on the native MPAS grid
3 participants